<template>
  <div class="logo">
    <!-- 图片是绝对路径没有问题 -->
    <!-- 图片是相对路径，在html里面写的时候也没问题 -->
    <!-- 相对路径变成data的变量, 需要import或者require -->
    <img :src="imgUrl" alt="" />
  </div>
</template>

<script>
// import img from "../../../assets/images/logo.png";
export default {
  data() {
    return {
      imgUrl: require("../../../../assets/images/logo.png"),
    };
  },
};
</script>

<style lang="less" scoped>
@import "../../../../assets/css/var.less";
.logo {
  width: 100%;
  height: 60px;
  border-bottom: 1px solid @border-color;
  background: #fff;

  img {
    width: 94px;
    height: 39px;
    margin: 10px 0 0 20px;
  }
}
</style>
